package com.ssm.platform.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ssm.platform.pojo.domain.MenusDo;
import com.ssm.platform.pojo.vo.MenusVo;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

import static com.ssm.basis.service.constant.CacheNameConstant.MENUS_LIST;
import static com.ssm.basis.service.constant.CacheNameConstant.MENUS_TREE;

public interface IMenusService extends IService<MenusDo> {
    @Cacheable(cacheNames = MENUS_LIST, key = "#username")
    List<MenusVo> list(String username);

    @Cacheable(cacheNames = MENUS_TREE, key = "#username")
    List<MenusVo> tree(String username);
}
